package cn.luowb.checkchat.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 媒体资源
 *
 * @TableName media_resource
 */
@TableName(value = "media_resource")
public class MediaResourceDO {
    /**
     * 资源ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 资源类型,image/video/audio
     */
    @TableField(value = "type")
    private String type;

    /**
     * 资源URL
     */
    @TableField(value = "url")
    private String url;

    /**
     * 引用实体ID
     */
    @TableField(value = "ref_id")
    private Long refId;

    /**
     * 引用类型: post/comment/avatar
     */
    @TableField(value = "ref_type")
    private String refType;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 资源ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 资源ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 资源类型,image/video/audio
     */
    public String getType() {
        return type;
    }

    /**
     * 资源类型,image/video/audio
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 资源URL
     */
    public String getUrl() {
        return url;
    }

    /**
     * 资源URL
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * 引用实体ID
     */
    public Long getRefId() {
        return refId;
    }

    /**
     * 引用实体ID
     */
    public void setRefId(Long refId) {
        this.refId = refId;
    }

    /**
     * 引用类型: post/comment/avatar
     */
    public String getRefType() {
        return refType;
    }

    /**
     * 引用类型: post/comment/avatar
     */
    public void setRefType(String refType) {
        this.refType = refType;
    }

    /**
     * 创建时间
     */
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
}